#ifndef _LOCKERS_H_CSEAPI_
#define _LOCKERS_H_CSEAPI_

#if defined(__WINDOWS__) && defined(_MSC_VER)
  #define CRITICAL_SECT_SIZE     (sizeof(TInt) > sizeof(TInt32)? 40: 24)
#else
  #error "Unknown C++ compiler!" // other compiler not support yet
#endif

extern CSE_IMPEXP_IN TUint32 Cse_GetCurrThreadId();

class CSE_IMPEXP_IN TCriticalSection
{
private:
    char m_buffer[CRITICAL_SECT_SIZE];

    // copy constructor and copy assign is disabled
    TCriticalSection(const TCriticalSection&);
    TCriticalSection& operator=(const TCriticalSection&);
    
public:
    TCriticalSection();
    ~TCriticalSection();

    void enter();
    void leave();
};

#endif
